package com.qf.air.fallback;

import com.qf.air.clinet.AirSearchClient;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 10537
 * @version V1.0
 * @Date 2021/11/11 19:41
 */
@Component
public class AirSearchClientFallbackFactory implements FallbackFactory<AirSearchClient> {

    @Autowired
    private AirSearchClientFallback airSearchClientFallback;

    @Override
    public AirSearchClient create(Throwable throwable) {
        System.out.println(throwable.getMessage());
        throwable.printStackTrace();
        return airSearchClientFallback;
    }
}
